package com.hesicare.adapter.service.impl;

import com.hesicare.adapter.entity.HisStaff;
import com.hesicare.adapter.service.IParseUserService;
import com.hesicare.health.worker.DoUser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

/**
 * @author 55097
 */
@Service
public class ParseUserServiceImpl implements IParseUserService {

    @Autowired
    private DoUser doUser;

    protected final static Logger log = LoggerFactory.getLogger(ParseUserServiceImpl.class);

    @Override
    public void parseUser(Object obList) {
        if (obList != null) {
            ArrayList<HisStaff> $list = (ArrayList<HisStaff>) obList;
            $list.stream().forEach(hisStaff -> {
                doUser.doUser(hisStaff);
            });
        }
    }
}


